<div *ngIf="trip" class="form-horizontal">
    <div class="row">
        <div class="form-group col-sm-6">
            <label class="form-control-label">ID:</label>
            <input [(ngModel)]="trip.trip_id" placeholder="车次ID" class="form-control" required readonly/>
        </div>
        <div class="form-group col-sm-6">
            <label class="form-control-label">车次名称:</label>
            <input [(ngModel)]="trip.trip_name" placeholder="车次名称" class="form-control" required readonly />
        </div>
    </div>
    <div class="row">
        <div class="form-group col-sm-6">
            <label class="form-control-label">发车时间:</label>
            <input [(ngModel)]="trip.trip_time" placeholder="发车时间" class="form-control" required readonly />
        </div>
        <div class="form-group col-sm-6">
            <label class="form-control-label">票价:</label>
            <input [(ngModel)]="trip.price" placeholder="票价" class="form-control" type="number" required readonly />
        </div>
    </div>
    <div class="row">
        <div class="form-group col-sm-6">
            <label for="carrier" class="form-control-label">所属公司:</label>
            <select class="form-control" id="power" required [(ngModel)]="trip.carrier_id" name="power" disabled>
                <option *ngFor="let carrier of carriers" [value]="carrier.carrier_id">{{carrier.carrier_name}}</option>
            </select>
        </div>
        <div class="form-group col-sm-6">
            <label for="carrier" class="form-control-label">车辆:</label>
            <select class="form-control" id="power" required [(ngModel)]="trip.bus_id" name="power">
                <option *ngFor="let bus of buses" [value]="bus.bus_id">{{bus.plate_number}}</option>
            </select>
        </div>
    </div>
    <div class="row">
        <div class="form-group col-sm-6">
            <label for="carrier" class="form-control-label">司机:</label>
            <select class="form-control" id="power" [(ngModel)]="trip.driver_id" name="power">
                <option *ngFor="let driver of drivers" [value]="driver.driver_id">{{driver.driver_name}}</option>
            </select>
        </div>
        <div class="form-group col-sm-6">
            <label class="form-control-label">是否有效:</label>
            <select class="form-control" id="status"  [(ngModel)]="trip.status" disabled>
            <option>YES</option>
            <option>NO</option>
        </select>
        </div>
    </div>
    <div class="row">
        <div class="form-group">
            <!--<div class="col-sm-1">
                <button class="btn btn-danger" *ngIf="trip.trip_id" (click)="delete()">删除</button>
            </div>-->
            <div class="offset-sm-9 col-sm-1">
                <button class="btn btn-default" (click)="cancel()">取消</button>
            </div>
            <div class="col-sm-1">
                <button class="btn btn-primary" (click)="save()">保存</button>
            </div>
        </div>
    </div>
</div>
